package com.conpany.project;

import java.util.concurrent.TimeUnit;

/**
 * @Author: zhaoqi
 * @Date: 2018/11/18 18:14
 * @Version 1.0
 */

public class ThreadInterrupt {

    public static void main(String[] args) {

        Thread thread = new Thread(() ->{

            for (int i = 0; i < 10; i++) {
                if (i % 2 == 1){
                    System.out.println("-------------");
                } else {
                    System.out.println("*************");
                }

            }

        });

        thread.run();

    }

}
